//配置index.js
const run = require('./reptile/db');
const koa = require("koa");
const Router = require('koa-router');
const router = new Router();
var cors = require('koa2-cors');
const app =  new koa();
router.get("/",async ctx=>{
    var data = await run();

    ctx.body = data;
})
app.use(cors());
app.use(router.routes())
app.listen(8080)